package com.lagou.edu.mvcframework.controller;

import com.lagou.edu.mvcframework.annocations.LgAutowired;
import com.lagou.edu.mvcframework.annocations.LgRequestMapping;
import com.lagou.edu.mvcframework.annocations.LgouController;
import com.lagou.edu.mvcframework.annocations.Security;
import com.lagou.edu.mvcframework.service.IDemoService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author 陶肖寅
 * @version V1.0
 * @Package com.lagou.edu.mvcframework.controller
 * @date 2020-02-01 09:50
 * @Copyright © 2020-2021 城云科技(中国)有限公司
 */
@LgouController
@LgRequestMapping("/demo")
public class DemoController {
    @LgAutowired
    public IDemoService demoService;
    @LgRequestMapping("/query")
    public String get(HttpServletRequest request, HttpServletResponse response,String name){
        return  demoService.get(name);
    }
    @LgRequestMapping("/handle01")
    public String handle01(HttpServletRequest request, HttpServletResponse response,String username){
        return  demoService.get(username);
    }
    @LgRequestMapping("/handle02")
    @Security(value = {"taoxiaoyin1","taoxiaoyin2"})
    public String handle02(HttpServletRequest request, HttpServletResponse response,String username){
        return  demoService.get(username);
    }
}
